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

PIMP my script! Or remake it..

DVEagle

New Member
Joined
Aug 29, 2009
Messages
95
Reaction score
3
Location
PoLand
MOVEMENT
Lua:
local t = {
	storage = 32001,
	monster = {"Grim Reaper", {x=1110, y=1250, z=11}},
	msg = "You've inject the demonic portal!!"
}
                        m1pos = {x=1117, y=1244, z=11}
                        m2pos = {x=1118, y=1244, z=11}
                        m3pos = {x=1118, y=1243, z=11}
                        m4pos = {x=1111, y=1249, z=11}
                        m5pos = {x=1116, y=1245, z=11}


function onStepIn(cid, item, position, fromPosition)
	if getPlayerStorageValue(cid, t.storage) < 1 then  
	if isplayer (cid) then  
		doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
		doSummonCreature(t.monster[1], t.monster[2])
                doSummonCreature("Uber Demon", m1pos)
                doSummonCreature("Infernalist", m2pos)
                doSummonCreature("Plaguesmith", m3pos)
                doSummonCreature("Nightmare", m4pos)
                doSummonCreature("Hellspawn", m5pos)
		setPlayerStorageValue(cid, t.storage, 1)
	end
	return TRUE
end
When monster step on this floor then action happens again.. So i want only players could open 'THE DEMONIC PORTAL' Aaargh!
It's simple but not 4 me :)

I've added this line "if isplayer (cid) then" but i don't even check it because it's shit :).
 
isPlayer(cid)

Edit. seems u've got more mistakes. Take:
Lua:
local t = {
	storage = 32001,
	monster = {"Grim Reaper", {x=1110, y=1250, z=11}},
	msg = "You've inject the demonic portal!!"
}
                        m1pos = {x=1117, y=1244, z=11}
                        m2pos = {x=1118, y=1244, z=11}
                        m3pos = {x=1118, y=1243, z=11}
                        m4pos = {x=1111, y=1249, z=11}
                        m5pos = {x=1116, y=1245, z=11}
 
 
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) and getPlayerStorageValue(cid, t.storage) < 1 then  
		doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
		doSummonCreature(t.monster[1], t.monster[2])
                doSummonCreature("Uber Demon", m1pos)
                doSummonCreature("Infernalist", m2pos)
                doSummonCreature("Plaguesmith", m3pos)
                doSummonCreature("Nightmare", m4pos)
                doSummonCreature("Hellspawn", m5pos)
		setPlayerStorageValue(cid, t.storage, 1)
	end
	return TRUE
end
 
You got pimp'd

Lua:
local s,str,n = 32001,"You've inject the demonic portal!!",{'Grim Reaper','Uber Demon','Infernalist','Plaguesmith','Nightmare','Hellspawn'}
local p = {{x=1110, y=1250, z=11},{x=1117, y=1244, z=11},{x=1118, y=1244, z=11},{x=1118, y=1243, z=11},{x=1111, y=1249, z=11},{x=1116, y=1245, z=11}}
function onStepIn(cid,item,frompos,topos)
local v = getThingPos(cid)
	if isPlayer(cid) then
		if getPlayerStorageValue(cid,s) <= 0 then
			for i = 1,#n do
				doSummonCreature(n[i]:lower(),p[i])
				doSendMagicEffect(p[i],CONST_ME_TELEPORT)
			end
			doCreatureSay(cid,str,TALKTYPE_ORANGE_1)
			setPlayerStorageValue(cid,s,1)
		else
			doPlayerSendCancel(cid,'Can\'t do this twice.')
			doSendMagicEffect(v,CONST_ME_POFF)
		end
	end
	return true
end
 

Similar threads

Back
Top