• 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!

Lua Hey problem with rune but not lever <

ellan98

Banned User
Joined
Apr 21, 2012
Messages
111
Reaction score
0
Well I have an script and this is the script i have


PHP:
 [1248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 3}, -- sudden death rune


PHP:
That  [1248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 3}, -- sudden death rune  < i want 3 charges all i get always 1 bp with 20 sudden deaths only 1 and 1 bp can take 20 slots and i get only 1 sds on each 1 ,  1 , 1 ,1, 1, ,1 , 1 < only that

And i use no infited runes cuz my ot is not gonna have some infited rune how to fix? so it gets 3 charges? i also tryed in Spells.xml and i changed to 3 still same i get 1

PHP:
And Another Problem My Donate star (Viper star) It goes on charges i made in config false , and still goes on chages and i made no still goes on charges why? any help and i named it donate star i still get the name Viper Star
 
Problem with viper star: Go to items.xml find viper star and change
Code:
<attribute key="breakChance" value="[COLOR="#FF0000"]9[/COLOR]"/>
to
Code:
<attribute key="breakChance" value="[COLOR="#008000"]0[/COLOR]"/>
 
Please post the rest of the script you are using!
It would seem that " charges = 3 " is being ignored, but I cannot know why without seeing the rest of the script!

PHP:
--[[   Runes Script v1.3 
        by Shawak, Sherlok & Renusek   ]]-- 
 
local config = { 
 
        [1248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 3}, -- sudden death rune 
        [1249] = {potion = 2269, cost = 6400, backpack_id = 2002, charges = 3}, -- wild growth rune 
        [1250] = {potion = 2298, cost = 6300, backpack_id = 2002, charges = 1}, -- manarne rune 
        [1251] = {potion = 2305, cost = 7000, backpack_id = 2000, charges = 2}, -- fire bomb rune                 
        [1252] = {potion = 2308, cost = 4200, backpack_id = 2000, charges = 3}, -- soulfire rune 
        [1253] = {potion = 2278, cost = 14000, backpack_id = 5949, charges = 2}, -- paralyze rune 
        [1254] = {potion = 2273, cost = 3500, backpack_id = 2002, charges = 3}, -- ultimate healing rune 
        [1255] = {potion = 2261, cost = 900, backpack_id = 2003, charges = 3}, -- destroy field rune                 
        [1256] = {potion = 2293, cost = 7000, backpack_id = 2004, charges = 3} -- magic wall rune 
 
} -- config end -- 
 
function onUse(cid, item, fromPosition, itemEx, toPosition) 
    local potion = config[item.uid] 
    if isInArray({1945, 1946}, item.itemid) ~= TRUE then 
        return TRUE 
    end 
    if doPlayerBuyItemContainer(cid, potion.backpack_id, potion.potion, 1, potion.cost, 1) == TRUE then 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You bought a backpack "..getItemNameById(potion.potion).." for "..potion.cost.." gold coins.") 
    else 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need "..potion.cost.." gold coins for a backpack "..getItemNameById(potion.potion)..".") 
    end 
    return TRUE 
end
 
EDIT:
This should work:
Code:
--[[   Runes Script v1.3  
        by Shawak, Sherlok & Renusek   ]]--  
  
local config = {  
  
        [1248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 3}, -- sudden death rune  
        [1249] = {potion = 2269, cost = 6400, backpack_id = 2002, charges = 3}, -- wild growth rune  
        [1250] = {potion = 2298, cost = 6300, backpack_id = 2002, charges = 1}, -- manarne rune  
        [1251] = {potion = 2305, cost = 7000, backpack_id = 2000, charges = 2}, -- fire bomb rune                  
        [1252] = {potion = 2308, cost = 4200, backpack_id = 2000, charges = 3}, -- soulfire rune  
        [1253] = {potion = 2278, cost = 14000, backpack_id = 5949, charges = 2}, -- paralyze rune  
        [1254] = {potion = 2273, cost = 3500, backpack_id = 2002, charges = 3}, -- ultimate healing rune  
        [1255] = {potion = 2261, cost = 900, backpack_id = 2003, charges = 3}, -- destroy field rune                  
        [1256] = {potion = 2293, cost = 7000, backpack_id = 2004, charges = 3} -- magic wall rune  
  
} -- config end --  
  
function onUse(cid, item, fromPosition, itemEx, toPosition)  
    local potion = config[item.uid]  
    if isInArray({1945, 1946}, item.itemid) ~= TRUE then  
        return TRUE  
    end  
    if doPlayerBuyItemContainer(cid, potion.backpack_id, potion.potion, 1, potion.cost, potion.charges) == TRUE then  
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You bought a backpack "..getItemNameById(potion.potion).." for "..potion.cost.." gold coins.")  
    else  
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need "..potion.cost.." gold coins for a backpack "..getItemNameById(potion.potion)..".")  
    end  
    return TRUE  
end
 
Back
Top