• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help with pet system script

GoGal

New Member
Joined
Sep 14, 2009
Messages
21
Reaction score
0
i am a noob scripter i have jose junior's pet system and i wanted to make that the player need to open an egg to gain a pet but i dont now how to make the pet race random here is the pet egg script that i made
PHP:
function onUse(cid, item, frompos, item2, topos)
pos = getPlayerPosition(cid)
if item.itemid == 4850 then
doTransformItem(item.uid,2178)
createPet(cid, 8, 1500, 1500)	
doSendMagicEffect(topos,39)
doCreatureSay(cid, "You have gained a pet say /pet to call him", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid,item.type)
else
doPlayerSendCancel(cid,"No Puedes hacer a tu pet aqui.")
end
return 1
end

Function of the pet system that im using in script
PHP:
createPet(cid, raceId, hp, mana)

Pet System Functions if you need them
PHP:
-----functions Get:------											
getPlayerPet(cid)										
getPetExp(cid)											
getPetMaxHp(cid)										
getPetMana(cid)										
getPetMaxMana(cid)										
getPetLvl(cid)											
getPetMl(cid)											
getPetManaSpend(cid)										
getPetRace(cid)											
getPetId(cid)											
getPetPos(cid)									
getPriceRevive(cid)										
getRaceNameById(raceId)									
getLvlStage(lvl)											
getExpForLvl(lvl)										
getReqManaSpend(cid, magLevel)								
getItemNameFromSlot(cid, slot)								
getValueInArray(array, value)
getRamdomThing(table)									
getPetLastHealth(cid) 										
getCreatureLastPosition(cid)							
getSpeedByLevel(level)								
-----Functions Add:-----
addPetExp(cid, ammount)							
addPetMana(cid, ammount)							
addPetLvl(cid, ammount)							
addPetManaSpend(cid, ammount)						
addPetMl(cid, ammount)							
addNpcAutoSay(npcId, time, messages)						
addExhausted(cid, seconds)							
-----Functions Do:-----										
doPetRemoveMana(cid, ammount)								
doRemovePet(cid)										
doSummonPet(cid[, pos)									
doPlayerHavePet(cid)										
doResetPet(cid)										
doPetFeed(cid, foodId)										
-----Functions Is:-----										
isPetOnline(cid)											
isPetDead(cid)											
isExhausted(cid)										
isFood(itemid)											
isPotion(itemid)										
isSummon(uid)											
-----Functions Set:-----										
setPetId(cid, petId)										
setPetStats(cid, stats)										
setSkull(cid, type)										
setPetLastHealth(cid, health)
-----Functions Others:-----									
createPet(cid, raceId, hp, mana)
s(s)										
petFormula(ml, lvl, maxb, maxa, minb, mina)
fixTimer(v)											
returnMessage(cid, message)									
sendWindowsMessage(cid, message)
-----Functions PeT-WaR:-----										
isPetInWar(cid)									
isInvitedToWar(cid, enemy)									
doInviteToWar(cid, enemy)									
doStartWar(cid, enemy)									
getPetEnemy(cid)										
leaveWar(cid)											
stopWar(cid, enemy)										
resetWar(cid)											
-----Functions PeT-Party:-----									
isInPetParty(cid)										
doStartPetParty(cid)										
doLeavePetParty(cid)

plx i need this script for my server
 
Code:
createPet(cid, raceId, hp, mana)
will not work because it's not a function located in function.lua, I would
suggest to post the whole file script of jose junior, please not posted here
in words since jose's script is very big, just zip it and post it on a file
sharing site, also post any errors that the script gives you so we can help
you better.
 
Back
Top