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

Solved Update small scripts please!

RaikND

facebook.xenoria.org
Joined
May 12, 2010
Messages
942
Reaction score
10
Location
Spain
SOLVED SCRIPTS, THANKS TO CYBERM AND ANOTHERS PEOPLES WHO'S HELP TO FIX THEM.

first (Movements):
LUA:
-- Script By RaikND, set StorageID Tile "First SCRIPT on movements"
function onStepIn(cid, item, position)
local cfg = {
      level = 30,  
	  storage = 30104,
	  textCompleted = "Ya tienes accesos para entrar a la Blue Djinn!",
	  cancelText = "Mission completada"
}

lvl = getPlayerLevel(cid)

if item.actionid == cfg.storage and lvl >= cfg.level == -1 then
getCreatureStorage(cid, cfg.storage)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, cfg.textCompleted)
doPlayerSetStorageValue(cid, cfg.storage, 1)
else
doPlayerSendCancel(cid, cfg.cancelText)
end
return false
end
second, action:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   
       if doPlayerRemoveItem(cid, 2472, 1) then
	       doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Aqui tienes tu dinero.")
           doPlayerAddItem(cid, 2160, 20)
       else
           doPlayerSendCancel(cid, "You dont have This item.")
       end
   
       return false
   end

Please i need help, thanks a lot!
 
Last edited:
wats wrong with them?

First says "The tile seems to be protected against unwanted intruders."
and second: "doPlayerSendCancel(cid, "You dont have This item.")"

i use 3851 SVN 0.4 - this scripts i think was on tfs mystic spirit 0.2.3, dont remember...
 
1st:
LUA:
function onStepIn(cid, item, pos)
 
local storage = 30104
 
		if getPlayerStorageValue(cid,storage) == -1 then		
		doPlayerSendTextMessage(cid,22,"Blue Djinn Complete.")
 		setPlayerStorageValue(cid,storage,1)
		else
		doPlayerSendCancel(cid,"You can enter to door.")	
		end
 
return true
end

try this for 2nd
LUA:
function onUse(cid, item, frompos, item2, topos)
 doPlayerRemoveItem(cid,2472,1)
 doPlayerAddItem(cid,2160,20)
 else
 doPlayerSendCancel(cid, "You dont have the required item.")
return true
end
 
Last edited:
not working :(
first:
LUA:
function onStepIn(cid, item, position, fromPosition)

veces = getPlayerStorageValue(cid,30104)

		if item.actionid == 30104 and veces == -1 then		
		doPlayerSendTextMessage(cid,22,"Blue Djinn Completa.")
 		setPlayerStorageValue(cid,30104,1)
		else
		doPlayerSendCancel(cid,"Ya puedes pasar la puerta.")	
		end

return true
end
second:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   
       if doPlayerRemoveItem(cid,2472,1) == 1 then
           doPlayerAddItem(cid,2160,20)
       else
           doPlayerSendCancel(cid, "You dont have This item.")
       end
   
       return true
   end
 
post the xml lines of the scripts (from movements.xml)

Oh, thanks CyberM, movements working now =D
Fixed Script and create by me:
LUA:
-- Script By RaikND, set StorageID Tile
function onStepIn(cid, item, position)
local cfg = {
      level = 30,  
	  storage = 30105,
	  textCompleted = "Your got access to enter to the Green Djinn!",
	  cancelText = "Quest completed."
}

lvl = getPlayerLevel(cid)

if item.actionid == cfg.storage and lvl >= cfg.level == -1 then
getCreatureStorage(cid, cfg.storage)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, cfg.textCompleted)
doPlayerSetStorageValue(cid, cfg.storage, 1)
else
doPlayerSendCancel(cid, cfg.cancelText)
end
return false
end

but this dont working | ACTION |:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   
       if doPlayerRemoveItem(cid,2398,1) == 1 then
           doPlayerAddItem(cid,2148,100)
       else
           doPlayerSendCancel(cid, "You dont have This item.")
       end
   
       return FALSE
   end
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if doPlayerRemoveItem(cid, 2398, 1) then
        doPlayerAddItem(cid, 2148, 100)
    else
        doPlayerSendCancel(cid, 'You dont have the required item.')
    end
    return true
end
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if doPlayerRemoveItem(cid, 2398, 1) then
        doPlayerAddItem(cid, 2148, 100)
    else
        doPlayerSendCancel(cid, 'You dont have the required item.')
    end
    return true
end

repped =D

EDIT:

cant give more :S tomorrow i will rep you again XD (Gracias T.T)
 
Back
Top