• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Help with a lua script

shadeness

@ Hackintosh
Joined
Jan 15, 2011
Messages
31
Reaction score
1
Location
Sweden
i need help with a lua script.
i am trying to create an npc that you can get nightmare or brotherhood outfit.
and if you already have nightmare you cant get brotherhood and if you already have brotherhood you cant get nightmare.
i want to know if someone could refine this code.
i have the code here
Code:
function SayText(cid)
		if(getPlayerSex(cid) == 0)then
        if doPlayerSendTextMessage == brotherhood then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,279,0)
				else
				if doPlayerSendTextMessage == nightmare then
					local pPos = getPlayerPosition(cid)
					doSendMagicEffect(pPos, 28)
						doPlayerAddOutfit(cid,269,0)
						else
		 if doPlayerSendTextMessage == brotherhood then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,278,0)
				else
				if 
				if doPlayerSendTextMessage == nightmare then
					local pPos = getPlayerPosition(cid)
					doSendMagicEffect(pPos, 28)
						doPlayerAddOutfit(cid,268,0)
        end
        return TRUE
Please.

~Shade~
 
..... this section of the forum is for tutorials, not lua requests, thats why there is a support section or a request section
 
i need help with a lua script.
i am trying to create an npc that you can get nightmare or brotherhood outfit.
and if you already have nightmare you cant get brotherhood and if you already have brotherhood you cant get nightmare.
i want to know if someone could refine this code.
i have the code here
Code:
function SayText(cid)
		if(getPlayerSex(cid) == 0)then
        if doPlayerSendTextMessage == brotherhood then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,279,0)
				else
				if doPlayerSendTextMessage == nightmare then
					local pPos = getPlayerPosition(cid)
					doSendMagicEffect(pPos, 28)
						doPlayerAddOutfit(cid,269,0)
						else
		 if doPlayerSendTextMessage == brotherhood then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,278,0)
				else
				if 
				if doPlayerSendTextMessage == nightmare then
					local pPos = getPlayerPosition(cid)
					doSendMagicEffect(pPos, 28)
						doPlayerAddOutfit(cid,268,0)
        end
        return TRUE
Please.

~Shade~
What ots is it? 7.6 or what? This doesn't look like LUA script..
 
Back
Top