• 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 Script for VIP players only!

Status
Not open for further replies.

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I have the following script:

Lua:
for i = 1, #tasks do
	if msgcontains(msg, tasks[i].name) then
		if talkState[talkUser] == 100 then
			if tasks[i].name == "carniphilas" then
				doNPCTalkALot(cid, 200, {"Damn walking weed-thingies! You'll find them deeper in the jungle. Weed out {150 "..tasks[i].name.."} for our society. Alright?"})
			elseif tasks[i].name == "crocodiles" then
				doNPCTalkALot(cid, 200, {"They are a nuisance! You'll find them here in the jungle near the river. Hunt {300 "..tasks[i].name.."} and you'll get a nice reward. Interested?"})
			elseif tasks[i].name == "tarantulas" then
				doNPCTalkALot(cid, 200, {"Do you want kill {300 tarantulas?}"})
			elseif tasks[i].name == "stone golems" then
				doNPCTalkALot(cid, 200, {"They can be found all over Tibia. You'll find them in mountain caves or rocky dungeons. Hunt {200} of them and come back to me. Understood?"})
			elseif tasks[i].name == "mammoths" then
				doNPCTalkALot(cid, 200, {"This particular species are found in Svargrond. Impressive beasts, but you wouldn't want one in your back garden. Hunt {300} of them. Alright?"})
			end

I'm trying to make, as players says "carniphias" or "mammoths", it checks if the player is VIP, like this example:

Lua:
if getPlayerVipDays(cid) > 1 then
 continue with script
else sendCancel "you must be a vip player to do this task".

Can someone help me with this, please? Just do one example and I do everything else and REP++ of course :]
 
Lua:
for i = 1, #tasks do
	if msgcontains(msg, tasks[i].name) then
		if talkState[talkUser] == 100 then
			if tasks[i].name == "carniphilas" then
				if getPlayerVipDays(cid) > 0 then
					doNPCTalkALot(cid, 200, {"Damn walking weed-thingies! You'll find them deeper in the jungle. Weed out {150 "..tasks[i].name.."} for our society. Alright?"})
				else
					doNPCTalkALot(cid, 200, {"You must be a Vip player to do this task."})
					return true
				end
			elseif tasks[i].name == "crocodiles" then
				doNPCTalkALot(cid, 200, {"They are a nuisance! You'll find them here in the jungle near the river. Hunt {300 "..tasks[i].name.."} and you'll get a nice reward. Interested?"})
			elseif tasks[i].name == "tarantulas" then
				doNPCTalkALot(cid, 200, {"Do you want kill {300 tarantulas?}"})
			elseif tasks[i].name == "stone golems" then
				doNPCTalkALot(cid, 200, {"They can be found all over Tibia. You'll find them in mountain caves or rocky dungeons. Hunt {200} of them and come back to me. Understood?"})
			elseif tasks[i].name == "mammoths" then
				if getPlayerVipDays(cid) > 0 then
					doNPCTalkALot(cid, 200, {"This particular species are found in Svargrond. Impressive beasts, but you wouldn't want one in your back garden. Hunt {300} of them. Alright?"})
				else
					doNPCTalkALot(cid, 200, {"You must be a Vip player to do this task."})
					return true
				end
			end
 
Status
Not open for further replies.
Back
Top