leertaste Posted March 22, 2013 Posted March 22, 2013 (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 March 22, 2013 by leertaste Quote
Wolf Posted March 22, 2013 Posted March 22, 2013 Pretty cool, do not see innovation, but a script is well done, without the labels. I hate so much labels! :@ Quote
Euphy Posted March 22, 2013 Posted March 22, 2013 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 Quote
mrlongshen Posted March 22, 2013 Posted March 22, 2013 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. Quote
leertaste Posted March 23, 2013 Author Posted March 23, 2013 Thanks Euphy, I've learned from it. @mrlongshen make sure you set the gm level to sth like 60 Quote
leertaste Posted March 23, 2013 Author Posted March 23, 2013 (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 March 23, 2013 by leertaste Quote
chunkhai88 Posted March 29, 2013 Posted March 29, 2013 (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 March 29, 2013 by chunkhai88 Quote
leertaste Posted March 29, 2013 Author Posted March 29, 2013 Give me the error from your mapserver. Quote
chunkhai88 Posted March 29, 2013 Posted March 29, 2013 [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) { Quote
mrlongshen Posted April 1, 2013 Posted April 1, 2013 that not error, that a duplication of script. please @reloadscript Quote
chunkhai88 Posted June 11, 2013 Posted June 11, 2013 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 Quote
mrlongshen Posted September 3, 2013 Posted September 3, 2013 the script is nice. but when game finish, the reward back to null . zzzz Quote
Lil Troll Posted September 13, 2013 Posted September 13, 2013 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 This is a great event, can i modify this event sir leertaste? Quote
donkeyg Posted November 19, 2013 Posted November 19, 2013 why everytime i @reloadscript , i m ust have to set the prize and the amount of click ?? cant i set it permanently?? Quote
Patskie Posted November 19, 2013 Posted November 19, 2013 @donkeyg use a global permanent variable Quote
panducakep Posted November 19, 2013 Posted November 19, 2013 I got experience when using this npc, some "naughty" players are using autoclick software. Have you considered that one sir? Quote
meko9586 Posted July 31, 2014 Posted July 31, 2014 If someone use auto clicking, then the event ruins. Quote
ParIsMakulit Posted September 14, 2014 Posted September 14, 2014 · 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
Hiryu Imajin Posted December 27, 2014 Posted December 27, 2014 @ParGFX, that's why I believe you would have to configure it. It is not about the script. Quote
_Terra Posted July 9, 2015 Posted July 9, 2015 (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 July 9, 2015 by xMegadeth1994 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.