Jump to content

Domination Event


Recommended Posts


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  137
  • Reputation:   1
  • Joined:  02/02/13
  • Last Seen:  

Domination Event

 

On the Domination Event you have to click onto an NPC until a certain Number is reached.
Every click from every char on the NPC will increase the Number by 1 (+1)
The winner is who clicked the last number (for example the 1000)

~Credits goes to me~

 

domination v1.0a.txt

domination v1.0.txt

 

//===== Changelog: ===========================================
//= -1.0a - Addet Current Variables when changing Price/Amount
//=           - Addet Effects to Show Member which Npc is meant
//=           - Addet Ingame Menupoint (For Admin) to edit required manage GM-Level
//=           - Addet Auto protect from Input 0 (Amount/GM Level)
//=           - Changed NPC ID cause of annoying noise
//=           - Fixed Bug that comes through Npctalk (changed to Announce)
//=
//= -1.0  Finshed Scripting
//============================================================

 

 

Greetz Leertaste

Edited by leertaste
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  96
  • Reputation:   42
  • Joined:  11/15/11
  • Last Seen:  

Pretty cool, do not see innovation, but a script is well done, without the labels. I hate so much labels! :@

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Some suggestions:

  • In l_start, use 'sleep' instead of 'sleep2' (it's bad practice to use 'sleep2' when no player is attached); then replace 'goto l_start' with 'donpcevent "[Domination]::OnStartEvent' (with the label renamed, of course) or an equivalent.
  • When possible, avoid setting NPC variables (.var) repeatedly; either set them a single time OnInit, which saves processing, or use scope variables (.@var), which saves memory.
  • The script should check if all the needed variables are set before the event begins; consider including default values if anything is zero.
  • Use standard tabulation!  It makes scripts much easier to read and edit.

So, the script with the above corrections, along with minor formatting changes: http://pastebin.com/raw.php?i=6v3xzkg9

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

Some suggestions:

  • In l_start, use 'sleep' instead of 'sleep2' (it's bad practice to use 'sleep2' when no player is attached); then replace 'goto l_start' with 'donpcevent "[Domination]::OnStartEvent' (with the label renamed, of course) or an equivalent.
  • When possible, avoid setting NPC variables (.var) repeatedly; either set them a single time OnInit, which saves processing, or use scope variables (.@var), which saves memory.
  • The script should check if all the needed variables are set before the event begins; consider including default values if anything is zero.
  • Use standard tabulation!  It makes scripts much easier to read and edit.

So, the script with the above corrections, along with minor formatting changes: http://pastebin.com/raw.php?i=6v3xzkg9

 

player can set bro the event setting. please fix it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  137
  • Reputation:   1
  • Joined:  02/02/13
  • Last Seen:  

Thanks Euphy, I've learned from it. :)

@mrlongshen

 

make sure you set the gm level to sth like 60

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

im using ur default setting T_T

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  137
  • Reputation:   1
  • Joined:  02/02/13
  • Last Seen:  

You can edit from ingame the required gm level to get access to the gm menu
(you will need admin account (gmlvl 99) to do this)

otherwise you can test changing this parts of the script:

if(getgmlevel() > $GM_Dom-1) set .@menu$, .@menu$ + ":^008000Set Amount ^ff0000[GM]:^008000Set Price ^ff0000[GM]:^008000Start Event ^ff0000[GM]^000000";

to:

if(getgmlevel() > 60-1) set .@menu$, .@menu$ + ":^008000Set Amount ^ff0000[GM]:^008000Set Price ^ff0000[GM]:^008000Start Event ^ff0000[GM]^000000";

changing this will require to delete this parts of the script:

if(getgmlevel() > 99) set .@menu$, .@menu$ + ":^008000Set GM Level ^ff0000[ADMIN]^000000";

and:

 

	case 9:
		mes .@name$;
		mes "Enter the required GM Level";
		mes "to manage this Event.";
		mes " ";
		mes "Current is:";
		mes " -- ^ff0000"+$GM_Dom+"^000000 --";
		input $GM_Dom;
		if ($GM_Dom == 0){
			next;
			mes .@name$;
			mes "I think it's not a good idea let";
			mes "GM Level 0 manage this event.";
			mes " -- ^ff0000Automatically set to 60^000000 --";
			set $GM_Dom,60;
		}
		next;
		mes .@name$;
		mes "GM Level = ^ff0000"+$GM_Dom+"^000000";
		mes "can now manage this event.";
		next;
		mes .@name$;
		mes "What else?";
		next;
		goto h_menu;
Edited by leertaste
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  4
  • Reputation:   0
  • Joined:  11/22/12
  • Last Seen:  

is work well when using manualy (in game gm menu)  to active event,
 but when it is auto (OnClock), always stuck at broadcoast 1 minit left to start event, and after tat ntg happend at all, how to slove this bug pls?

Edited by chunkhai88
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  137
  • Reputation:   1
  • Joined:  02/02/13
  • Last Seen:  

Give me the error from your mapserver.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  4
  • Reputation:   0
  • Joined:  11/22/12
  • Last Seen:  

[Warning]: npc_parsename: Invalid unique name in file 'npc/custom/domination.txt', line'29'. Renaming '' to '0_390_115_146'.
[Warning]: npc_parsename: Duplicate unique name in file 'npc/custom/domination.txt', line'29'. Renaming '0_390_115_146' to '3_390_115_146'.
[Debug]: this npc:
   display name ''
   unique name '0_390_115_146'
   map=amatsu, x=115, y=146
[Debug]: other npc in 'npc/custom/domination.txt' :
   display name ''
   unique name '0_390_115_146'
   map=amatsu, x=115, y=146

_______________________________________________

 

this is my script

amatsu,115,146,5    script    [Domination]    403,{ <-------------line29
    if ($@domination_start == 1) {
        set .dom_click,.dom_click+1;
        specialeffect2 4;
        announce "Counter: ["+.dom_click+"]",bc_map|bc_blue;
        if (.dom_click == $@domination_amount) {
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

that not error, that a duplication of script. please @reloadscript

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  4
  • Reputation:   0
  • Joined:  11/22/12
  • Last Seen:  

i had try alot of times.. its only can work with manualy start event... swt



can leeraste update the script pls? the script is nice

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

the script  is nice. but when game finish, the reward back to null . zzzz

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Domination Event

 

On the Domination Event you have to click onto an NPC until a certain Number is reached.

Every click from every char on the NPC will increase the Number by 1 (+1)

The winner is who clicked the last number (for example the 1000)

~Credits goes to me~

 

attachicon.gifdomination v1.0a.txt

attachicon.gifdomination v1.0.txt

 

//===== Changelog: ===========================================

//= -1.0a - Addet Current Variables when changing Price/Amount

//=           - Addet Effects to Show Member which Npc is meant

//=           - Addet Ingame Menupoint (For Admin) to edit required manage GM-Level

//=           - Addet Auto protect from Input 0 (Amount/GM Level)

//=           - Changed NPC ID cause of annoying noise

//=           - Fixed Bug that comes through Npctalk (changed to Announce)

//=

//= -1.0  Finshed Scripting

//============================================================

 

 

Greetz Leertaste

This is a great event, can i modify this event sir leertaste?

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  344
  • Topics Per Day:  0.08
  • Content Count:  1060
  • Reputation:   1
  • Joined:  02/13/12
  • Last Seen:  

why everytime i @reloadscript , i m ust have to set the prize and the amount of click ?? cant i set it permanently??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

@donkeyg use a global permanent variable

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  77
  • Reputation:   3
  • Joined:  06/06/13
  • Last Seen:  

I got experience when using this npc, some "naughty" players are using autoclick software. Have you considered that one sir?

Link to comment
Share on other sites

  • 8 months later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  09/27/13
  • Last Seen:  

If someone use auto clicking, then the event ruins. /hum

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  117
  • Reputation:   6
  • Joined:  06/03/12
  • Last Seen:  

Posted · Hidden by Emistry, December 27, 2014 - No reason given
Hidden by Emistry, December 27, 2014 - No reason given

Noob Scripting Players can Set the Prize and They can start the Game fuck

Link to comment
  • 3 months later...

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   4
  • Joined:  07/10/13
  • Last Seen:  

@ParGFX, that's why I believe you would have to configure it. It is not about the script.

Link to comment
Share on other sites

  • 6 months later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  155
  • Reputation:   51
  • Joined:  07/15/13
  • Last Seen:  

If someone got problems with GM Options, or normal user got GM options only change this:

 

Find:

    if(getgmlevel() > $GM_Dom-1) set .@menu$, .@menu$ + ":^008000Set Amount ^ff0000[GM]:^008000Set Price ^ff0000[GM]:^008000Start Event ^ff0000[GM]^000000";
    if(getgmlevel() > 99) set .@menu$, .@menu$ + ":^008000Set GM Level ^ff0000[ADMIN]^000000";

 

Change:

    if(getgmlevel() >= 99) set .@menu$, .@menu$ + ":^008000Set Amount ^ff0000[GM]:^008000Set Price ^ff0000[GM]:^008000Start Event ^ff0000[GM]^000000";
    if(getgmlevel() >= 99) set .@menu$, .@menu$ + ":^008000Set GM Level ^ff0000[ADMIN]^000000";

 

This only read admin level, gm and user appears normal menu.

 

Sorry my bad english!.

Edited by xMegadeth1994
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
Reply to this topic...

×   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...