[HOW TO] Restrict GM drop items!

01/25/2013 13:34 lucy08#1
Hallo liebe community,

In this tutorial i will show you how to restrict GM's drop or trade items.

To restrict Drop, do this:
1. Open game.py and find this code:
Code:
def __SendDropItemPacket(self, itemVNum, itemCount):
2. Under that, add this code:
Code:
		# GM_DISABLE_ITEM_DROP
		char = player.GetMainCharacterName()
		GMMark= "["
		if char >= GMMark:
			chat.AppendChat(chat.CHAT_TYPE_INFO, locale.DROP_ITEM_FAILURE_GM)
			return
		# END_OF_GM_DISABLE_ITEM_DROP
3. Open locale_game.txt and add this:
Code:
DROP_ITEM_FAILURE_GM	GM can't drop items on the ground.
To restrict Trade, do this:
1. Open game.py and find this code:
Code:
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
2. Under that, add this code:
Code:
		# GM_DISABLE_ITEM_SEND
		char = player.GetMainCharacterName()
		GMMark= "["
		if char >= GMMark:
			chat.AppendChat(chat.CHAT_TYPE_INFO, locale.SEND_ITEM_FAILURE_GM)
			return
		# END_OF_GM_DISABLE_ITEM_SEND
3. Open locale_game.txt and add this:
Code:
SEND_ITEM_FAILURE_GM	GM can't send items.

have fun, lucy08 :D
01/25/2013 15:53 Chikyou#2
Nice :D
But, how i suppost to do to restrict gm to negotiate?
01/25/2013 15:56 #SoNiice#3
Nice idea, but it can't work how u did it.
01/25/2013 15:59 IgorGlock#4
It should work :)
But not the best way.
01/25/2013 16:00 #SoNiice#5
Quote:
Originally Posted by IgorGlock View Post
It should work :)
But not the best way.
Man kann in Python Strings mit "Größer / Gleich" abfragen? Habe ich noch nie getestet, daher behaupte ich mal, dass es nicht geht - Wäre auch irgendwie unlogisch.
01/25/2013 17:28 LotusSky#6
Selbst dann kann ein Gamemaster immer noch die Sachen ins Lager tun und sich nen anderen Char erstellen mit dem er es dann fallen lässt :)
01/25/2013 18:34 .XXShuzZzle#7
Quote:
Originally Posted by SoNiice View Post
Man kann in Python Strings mit "Größer / Gleich" abfragen? Habe ich noch nie getestet, daher behaupte ich mal, dass es nicht geht - Wäre auch irgendwie unlogisch.
glaub ich auch nicht das macht keinen sinn einfach mit if char.find("[") != -1:
01/25/2013 19:44 #SoNiice#8
Quote:
Originally Posted by ShuzZzle View Post
glaub ich auch nicht das macht keinen sinn einfach mit if char.find("[") != -1:
Damit würde es schon eher gehen, aber definitiv nicht so, wie der Threadersteller es postete!
01/25/2013 19:48 lucy08#9
@Chikyou
INCOMING!

@SoNiice
yes, it's possible
edit: try it, it's not hard work to do!

@ShuzZzle
that's incorect in this context
01/25/2013 19:50 .NoThx#10
[Only registered and activated users can see links. Click Here To Register...]

already released.
#closerequest
01/25/2013 20:28 lucy08#11
i updated tutorial :D
01/25/2013 22:11 chrisicek#12
It should work
But not the best way.:)))
01/26/2013 17:22 Chikyou#13
Quote:
Originally Posted by lucy08 View Post
To restrict Trade, do this:
1. Open game.py and find this code:
Code:
def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
2. Under that, add this code:
Code:
		# GM_DISABLE_ITEM_SEND
		char = player.GetMainCharacterName()
		GMMark= "["
		if char >= GMMark:
			chat.AppendChat(chat.CHAT_TYPE_INFO, locale.SEND_ITEM_FAILURE_GM)
			return
		# END_OF_GM_DISABLE_ITEM_SEND
3. Open locale_game.txt and add this:
Code:
SEND_ITEM_FAILURE_GM	GM can't send items.

have fun, lucy08 :D
This is not working '-'
01/29/2013 10:19 lucy08#14
have you even tried?
give it a chance if you need it, it's sample... :P
01/29/2013 20:54 .Wildfire#15
Ich habe für diese gesucht seit Jahren!