leertaste Posted March 22, 2013 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 137 Reputation: 1 Joined: 02/02/13 Last Seen: July 18, 2019 Share 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 Link to comment Share on other sites More sharing options...
Wolf Posted March 22, 2013 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 96 Reputation: 42 Joined: 11/15/11 Last Seen: May 19, 2023 Share 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 Link to comment Share on other sites More sharing options...
Euphy Posted March 22, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share 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 Link to comment Share on other sites More sharing options...
mrlongshen Posted March 22, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share 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 Link to comment Share on other sites More sharing options...
leertaste Posted March 23, 2013 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 137 Reputation: 1 Joined: 02/02/13 Last Seen: July 18, 2019 Author Share Posted March 23, 2013 Thanks Euphy, I've learned from it. @mrlongshen make sure you set the gm level to sth like 60 Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted March 23, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted March 23, 2013 im using ur default setting T_T Quote Link to comment Share on other sites More sharing options...
leertaste Posted March 23, 2013 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 137 Reputation: 1 Joined: 02/02/13 Last Seen: July 18, 2019 Author Share 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 Link to comment Share on other sites More sharing options...
chunkhai88 Posted March 29, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 4 Reputation: 0 Joined: 11/22/12 Last Seen: July 14, 2013 Share 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 Link to comment Share on other sites More sharing options...
leertaste Posted March 29, 2013 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 137 Reputation: 1 Joined: 02/02/13 Last Seen: July 18, 2019 Author Share Posted March 29, 2013 Give me the error from your mapserver. Quote Link to comment Share on other sites More sharing options...
chunkhai88 Posted March 29, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 4 Reputation: 0 Joined: 11/22/12 Last Seen: July 14, 2013 Share 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 Link to comment Share on other sites More sharing options...
mrlongshen Posted April 1, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted April 1, 2013 that not error, that a duplication of script. please @reloadscript Quote Link to comment Share on other sites More sharing options...
chunkhai88 Posted June 11, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 4 Reputation: 0 Joined: 11/22/12 Last Seen: July 14, 2013 Share 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 Link to comment Share on other sites More sharing options...
mrlongshen Posted September 3, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted September 3, 2013 the script is nice. but when game finish, the reward back to null . zzzz Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted September 13, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share 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 Link to comment Share on other sites More sharing options...
donkeyg Posted November 19, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted November 19, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted November 19, 2013 @donkeyg use a global permanent variable Quote Link to comment Share on other sites More sharing options...
panducakep Posted November 19, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 77 Reputation: 3 Joined: 06/06/13 Last Seen: December 29, 2017 Share 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 Link to comment Share on other sites More sharing options...
meko9586 Posted July 31, 2014 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 09/27/13 Last Seen: March 25, 2021 Share Posted July 31, 2014 If someone use auto clicking, then the event ruins. Quote Link to comment Share on other sites More sharing options...
ParIsMakulit Posted September 14, 2014 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 117 Reputation: 6 Joined: 06/03/12 Last Seen: September 13, 2017 Share 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 Link to comment
Hiryu Imajin Posted December 27, 2014 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted December 27, 2014 @ParGFX, that's why I believe you would have to configure it. It is not about the script. Quote Link to comment Share on other sites More sharing options...
_Terra Posted July 9, 2015 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 168 Reputation: 55 Joined: 07/15/13 Last Seen: 17 hours ago Share 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 Link to comment Share on other sites More sharing options...
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.