samandriel
Active Member
- Joined
- Oct 19, 2016
- Messages
- 242
- Solutions
- 1
- Reaction score
- 46
I was thinking about add the new train mode in my 8.6 project...
It it would be nice in almost every project 8.6
I made this base:
It's working, but need some changes that idk how to do and need some help
1- Add charges to item 8980, something who show when player look the item (in description for example)
2- Change the if getPlayerItemCount(cid, 8980) < 1 then to that charges and remove charges until charge 1 and remove the item
3- Player click one time and still training until player move out, no need to click 1000 times if have 1000 charges
It it would be nice in almost every project 8.6
I made this base:
Code:
<action actionid="7998" script="train_weapon.lua" />
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerItemCount(cid, 8980) < 1 then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "You need a Exercise Weapon to train in a Exercise Dummie.")
return true
end
doSendMagicEffect(toPosition, 2)
doPlayerAddSkillTry(cid, SKILL_FIST, 1)
doPlayerRemoveItem(cid, 8980, 1)
return true
end
It's working, but need some changes that idk how to do and need some help
1- Add charges to item 8980, something who show when player look the item (in description for example)
2- Change the if getPlayerItemCount(cid, 8980) < 1 then to that charges and remove charges until charge 1 and remove the item
3- Player click one time and still training until player move out, no need to click 1000 times if have 1000 charges