Starliks
New Member
- Joined
- Jan 6, 2013
- Messages
- 16
- Reaction score
- 0
found a pet system by letter, and well what i need to follow the below content
More need someone to help me make some changes, they are:
1st level add the pet system, different from exp exp gains won by summoner
2nd pet will be invoked by clicking on the chart and click on the card again it will come back .. "" Equal system go / back pokemon ""
3rd the pet will attack shape, does not need the caller uses the cd
Create a file called LUA cardsytem in your home folder OTServ (where is your executable, dlls and config.lua)
tab = {
["Bug"] = {"bug", 50001, 1},
["Troll"] = {"troll", 50002, 40},
["Demon"] = {"demon", 50003, 80}
}
Now go and create a lib file called MOON card and put this:
function doPlayerStartCards(cid, namecard, pos)
dofile("./cardsytem.lua")
local n = namecard
local monster = tab[n]
pk = doSummonCreature(monster[1], pos)
doConvinceCreature(cid, pk)
return true
end
function doShowTextDialgListCards(cid, itemid)
dofile("./cardsytem.lua")
local n = namecard
local str = ""
str = str .. "Cards :\n\n"
for name, tab in pairs(tab) do
str = str..name.."\n"
end
str = str .. ""
doShowTextDialog(cid, itemid, str)
return TRUE
end
function getPlayerCard(cid, namecard)
dofile("./cardsytem.lua")
local n = namecard
local card = tab[n]
local cardname = card[2]
local cardnumber = getPlayerStorageValue(cid, cardname)
return cardnumber
end
function doPlayerAddNewCards(cid, namecard)
dofile("./cardsytem.lua")
local n = namecard
local newcard = tab[n]
setPlayerStorageValue(cid, newcard[2], 1)
return true
end
function getLevelCard(namecard)
dofile("./cardsytem.lua")
local n = namecard
local newcard = tab[n]
local cardlevel = newcard[3]
return cardlevel
end
function getCardprice(namecard)
dofile("./cardsytem.lua")
local n = namecard
local newcard = tab[n]
local newcardlevel = newcard[3]*4
return newcardlevel
end
function getCardId(namecard)
dofile("./cardsytem.lua")
local n = namecard
local newcard = tab[n]
local pricecard = newcard[2]-50000
return pricecard
end
function getPlayerPositionPz(cid)
local pz = getTilePzInfo(getCreaturePosition(cid))
return pz
end
function getCardStorage(namecard)
dofile("./cardsytem.lua")
local n = namecard
local newcard = tab[n]
local pricecard = newcard[2]
return pricecard
end
function getExistNameCard(namecard)
dofile("./cardsytem.lua")
local monster = tab
return monster[namecard]
end
More need someone to help me make some changes, they are:
1st level add the pet system, different from exp exp gains won by summoner
2nd pet will be invoked by clicking on the chart and click on the card again it will come back .. "" Equal system go / back pokemon ""
3rd the pet will attack shape, does not need the caller uses the cd