• 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 on this script - it remove item but no add correct item!

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
Credit: Cybershot
LUA:
donationsword_id = 10016 -- Item to be sold
      custodonationsword_id = 5 -- Value

local name = getItemNameById(donationsword_id)
----- End Config -----
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if doPlayerRemoveItem(cid, 9970, 5) == TRUE then  ------ change the 6527 to the id of the item you want to be removed from player and 200 = how many of this items the player will get removed
                local bag = doPlayerAddItem(cid, donationsword_id, 1)
                        doSendAnimatedText(fromPosition, "Wasted 5!", TEXTCOLOR_YELLOW)
                        doSendMagicEffect(fromPosition, math.random(10, 10) )
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have purchased a ".. name .." for ".. custodonationsword_id .." Buffary Coins.")
                  for i=1,1 do
                end
                else
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need ".. custodonationsword_id .." Buffary Coins for a ".. name ..".")
                end
        return FALSE
end
Basicly is this: id 10016 = CARA's Hat
script remove 5 items of id 9970, then add id 10016, then say "you bought "(ID 10016) Cara Hat for 5 buffary coins.
(how it is working [buged]) it removes 5 items, say "You bought CARA's HAT for 5 buffary" but no add CARA's HAT! adds mage manarune (id 2267)
i have this in actions.xml
LUA:
<action uniqueid="2324" script="Buffary/buffarytempletp.lua"/>
<action uniqueid="2325" script="Buffary/buffarycarashield.lua"/>
<action uniqueid="2326" script="Buffary/buffarycarahelmet.lua"/>
<action uniqueid="2327" script="Buffary/buffarymagemr.lua"/>
uniqueid 2324 should add temple teleport
uniqueid 2325 should add cara's shield
uniqueid 2326 should add cara's helmet
uniqueid 2327 should add mage manarune
what hapen is that those uniqueids are adding same ittem!!

help plz
sorry if didnt explain very well....
 
it says the correct
LUA:
                        doSendAnimatedText(fromPosition, "Wasted 5!", TEXTCOLOR_YELLOW)
                        doSendMagicEffect(fromPosition, math.random(10, 10) )
and the name, but the "value" of coins,
keeps 15 (instead of 5 for cara's items, and 1 for temple teleport)
It says "You bought a Cara's SHIELD for 15 buffary coins" but add mage manarune + say "wasted 5" (correct value of cara's shield) + add mage manarune -.-
 
Oh... Sorry mistaken :s since u helped me on another tthread I made a mistake
I can't change title
FOR AlL WASnT CYBERSHOT!!
Btw help on that promo scroll :p
:peace:
 
Back
Top