Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

Posted

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

Posted

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.

Posted (edited)

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
Posted (edited)

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
Posted
[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) {
  • 2 months later...
  • 2 months later...
  • 2 weeks later...
Posted

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?

  • 2 months later...
  • 8 months later...
  • 1 month later...
  • 3 months later...
  • 6 months later...
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...