-- example of fishing script--
   
   function onUse(cid, item, frompos, item2, topos)
         -- itemid means that is a creature
        if item2.itemid == 490 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 491 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 492 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 618 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 619 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 620 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 622 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 623 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 624 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 625 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 626 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 627 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 628 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
   
        elseif item2.itemid == 629 then
                 skill_level = getPlayerSkill(cid,6)
                 random_number = math.random(1,(100+skill_level/10))
                 doSendMagicEffect(topos,1)
                 if random_number<=skill_level then
                 doPlayerAddItem(cid,2667,1)
          end
             doPlayerAddSkillTry(cid,6,1)
      else 
    return 0
   end
   return 1
   end