Jump to content
  • 0

Request Again (:


Dokie

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  12/21/12
  • Last Seen:  

Can i request a script that when you just logged in you have to wait 5mins. after  5mins you can now use ( Trade , Deal , Vend )

Also if he/she that players tries to use Deal or Vend A message will appear like dispbottom
 ( You have to wait 5 minutes before using that . )

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I don't think it's possible by script... I think you need sources modifications.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

just create a new group id that disable trade vend deal...

all players will be using that group id upon register...

 

when they login...add a timer...example addtimer..

when the timer triggered...move then to other group id that can trade...or adjust the permission of their...

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  12/21/12
  • Last Seen:  

just create a new group id that disable trade vend deal...

all players will be using that group id upon register...

 

when they login...add a timer...example addtimer..

when the timer triggered...move then to other group id that can trade...or adjust the permission of their...

Can you give some example Emitry?. I'm newbie at scripting >.<.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  182
  • Reputation:   36
  • Joined:  01/26/12
  • Last Seen:  

Well, first of all you need to make a new group on /conf/groups.conf just like the normal groups but with trade permission disabled so that the players that just login are moved to that group. I'll create for example group number 6 which inherits from group id 0 (Normal players) and is to be placed after group number 4. You should create any new groups maintaining the current structure of the file:

{
	id: 5
	name: "Trade disallowed"
	level: 0
	inherit: ( "Player" )
	commands: {
		/* no commands by default */
	}
	permissions: {
		can_trade: false
	}
},

 

Then you'll have to restart your server in order for it to recognise this new group. If you don't get any error on this you're good to go and load this NPC script which is the one which will actually grant or remove the permissions to/from the players:

-	script	block_trade	-1,{
OnPCLoginEvent:
	if (getgmlevel()) end; // Prevents any GM to be affected and denied to trade by early ending the script. Moreover, it prevents to make them normal users.
	atcommand "@adjgroup 5"; // Puts the can't trade permission to any GM level 0 user that logs in
	addtimer 300000,strnpcinfo(3)+"::OnEnableTrade"; // 300000 milliseconds = 300 seconds = 5 minutes
	dispbottom "You'll have trade permissions as soon as you stay 5 minutes online.";
	end;

OnEnableTrade:
	atcommand "@adjgroup 0"; // Give them back the trade permission
	dispbottom "You now have trade permissions.";
	end;
}

And now you'll have this system active. I haven't tested it, but it should work without any error. Otherwise, tell us here!

Edited by jaBote
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

O_o I forgot this solution...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  12/21/12
  • Last Seen:  

Well, first of all you need to make a new group on /conf/groups.conf just like the normal groups but with trade permission disabled so that the players that just login are moved to that group. I'll create for example group number 6 which inherits from group id 0 (Normal players) and is to be placed after group number 4. You should create any new groups maintaining the current structure of the file:

{
	id: 5
	name: "Trade disallowed"
	level: 0
	inherit: ( "Player" )
	commands: {
		/* no commands by default */
	}
	permissions: {
		can_trade: false
	}
},

 

Then you'll have to restart your server in order for it to recognise this new group. If you don't get any error on this you're good to go and load this NPC script which is the one which will actually grant or remove the permissions to/from the players:

-	script	block_trade	-1,{
OnPCLoginEvent:
	if (getgmlevel()) end; // Prevents any GM to be affected and denied to trade by early ending the script. Moreover, it prevents to make them normal users.
	atcommand "@adjgroup 5"; // Puts the can't trade permission to any GM level 0 user that logs in
	addtimer 300000,strnpcinfo(3)+"::OnEnableTrade"; // 300000 milliseconds = 300 seconds = 5 minutes
	dispbottom "You'll have trade permissions as soon as you stay 5 minutes online.";
	end;

OnEnableTrade:
	atcommand "@adjgroup 0"; // Give them back the trade permission
	dispbottom "You now have trade permissions.";
	end;
}

And now you'll have this system active. I haven't tested it, but it should work without any error. Otherwise, tell us here!

It's working fine on normal accounts though , but when i logged in my ( GM Account Level: 100 ) i have to wait 5 minutes too mostly i didn't get this part. ( Kinda newbie at scripting learning time to time. (: )

-    script    block_trade    -1,{

OnPCLoginEvent:

    if (getgmlevel()) end; // Prevents any GM to be affected and denied to trade by early ending the script. Moreover, it prevents to make them normal users. 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  182
  • Reputation:   36
  • Joined:  01/26/12
  • Last Seen:  

I don't know what's happening right now, but try to have groups with GM level between 0 and 99. At least it was impossible to be GM level 100 before the new permission system was implemented.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...