Jump to content

Recommended Posts

Hey guys!!

It's me again :D!

My question is today if somebody can explain me how to make quests secure? Shogun told in his security checklist that its possible to claim quests reward multiple times. I want to prevent that so can somebody explain me how to make quests secure on all ends not only on double rewards.

Thanks in advance!

Kind regards

- Aurora 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Premium

simple exemple.

 

when blablabla begin

 pc.givereward_item

say("bfjfhjhh")

end

 

 

 

when blablabla begin

say("fjdhjfhjjh)

pc.giverewarditem

end

 

 

in the first exemple.

u get the item, then u get say text. if u dont end the quest u can get infinite itens.

 

 

the next one.

o get say..... and only then u get item.

if u dont complete the quest u never get the item.

 

hope u get this noob exemple.

 

if pc.get_sex() == true and npc.get_sex() == false then
	npc.purge()
end

 

Link to comment
Share on other sites

I have not read what you wrote but I read the title, but if you will not help this idea can give others. xD

Some protection may be next:

			if false == pc.can_warp() then	syschat("<Info> Wait 10 seconds before taking this quest!")	return	end

Make checks can_warp function such as:

  • - Private shop window && npc
  • - Your store window
  • - Window deposit
  • - Window refinery

If they were open 10 seconds behind them you will not be able to run quest.
As much praise, can fraud merchant window and bug at SS and other prizes etc.

			if pc.getqf("value_qf") > 0 then	syschat("<Info> You have already done this!")	return	end

And another check return in case your quest is finished to be unable to use because there are many quests that can operate in server and reopen.

			if pc.countitem(itemVnum) < 1 then	syschat("<Info> You do not have this item!")	return	end				

If you can not find any item in your inventory will have a function return, this is for quests with rewards if you receive items collected x x item.

            if pc.count_item(item.get_vnum()) >= 1 then	syschat(string.format("<Info> Succes arg %d)", itemVnum))	pc.give_item2(itemVnum, value)	item.remove()	end

A check correct to initiate an item and get a reward of item.

		local szForbidden = {110, 111, 112, 113}
		if table_is_in(szForbidden, pc.get_map_index()) then
			syschat("<Info> You can not do that in these maps!")
			return
		end

Running some quests in certain maps to be banned because some quests is mandatory that.

If you want to protect it much easier to check if you can do in a dungeon or on a map that is in game99.

		if table_is_in(szForbidden, pc.get_map_index()) or pc.in_dungeon() or pc.get_channel_id() == 99 then

[...................................................]

There are plenty of checks made for proper security for all quests, if you ever need anything please give me a pm.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.