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
Function of the pet system that im using in script
Pet System Functions if you need them
plx i need this script for my server
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