• 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 with a talkaction

Keiro

New Member
Joined
Jun 24, 2009
Messages
285
Reaction score
0
i need a !promotion talkationg that makes u promoted.....

i ahve this so far...is onuse...
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPremium(cid) == false then
   doPlayerSendCancel(cid,"You must have PACC.")
 return true
end
if isPremium(cid) == true and getPlayerLevel(cid) >= 20 then
  if getPlayerPromotionLevel(cid) == 0 then 
     setPlayerPromotionLevel(cid, 1)
	 doCreatureSay(cid,"You are now Promoted.",TALKTYPE_ORANGE_1)
     doSendMagicEffect(getPlayerPosition(cid),19)
	 return true
  end
  if getPlayerPromotionLevel(cid) > 0 then 
     doPlayerSendCancel(cid,"You are already promoted.")
 
  return true
  end
end



i need someone to edit this and make it talkactin , onSay

thanks on advance
 
LUA:
function onSay(cid, words, param, channel)
if isPremium(cid) == true then
	if getPlayerLevel(cid) >= 20 then
		if getPlayerPromotionLevel(cid) == 0 then 
		 doPlayerSetPromotionLevel(cid, 1)
		 doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_RED)
		 doCreatureSay(cid, "You are now Promoted.", TALKTYPE_ORANGE_1)
		else
		 doPlayerSendTextMessage(cid,22,"You are already promoted.")
		end
	else
	doPlayerSendTextMessage(cid,22,"You need to be at least 20 level to get promoted!")
	end
else
doPlayerSendTextMessage(cid,22,"You need to have premium account before you can get promoted.")
end
return 1
end
 
wats the difference between doPlayerSendCancel and doPlayerSendTextMessage ? thanks you.
doPlayerSendCancel sends the message only with default error white message below screen
->is a lua-made function* :
LUA:
function doPlayerSendCancel(cid, text)
    return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, text)
end


doPlayerSendTextMessage allows to choose from many message classes
->is a cpp-made function

*(i think)
 
Back
Top