![]() |
|
|
#1 |
|
Архивный участник
Join Date: Aug 2005
Posts: 394
|
This is originally used on my own server... but i'm using event mangers on my own server and i'm sharing gatekeeper version.
First of all you have to add this line to every GK: Code:
<a action="link teleporter_decreaseexp.htm">Decrease my experience.</a> Code:
<html> <head> <body> <html> <head> <body> Gatekeeper Clarissa:<br> We Gatekeepers use the will of the Gods to open the doors to time and space and teleport others. Which door would you like to open?<br> <a action="bypass -h teleport_request"> Teleport</a><br> <a action="bypass -h menu_select?ask=-303&reply=518"> Exchange with the Dimension Diamond</a><br> <a action="bypass -h menu_select?ask=-19&reply=0"> [Noblesse Only] teleport</a><br> <a action="bypass -h menu_select?ask=255&reply=4" msg="811;Monster Derby Track"> Move to Monster Derby Track (Free of Charge)</a><br> <a action="link teleporter_decreaseexp.htm">Decrease my experience.</a> <a action="bypass -h talk_select">Quest </a> </body> </html> But after the "teleporter" class! Open your ai.obj and add: Code:
class teleporter_decreaseexp : teleporter parameter_define_begin string fnLowLevel "teleporter_lowlevel.htm" string fnDoneDecrease "teleporter_donedecrease.htm" parameter_define_end handler 32 2123 // MENU_SELECTED variable_begin "talker" "ask" "reply" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // ask push_const 160 add fetch_i4 push_const 100 equal branch_false L50000 push_event // reply push_const 164 add fetch_i4 push_const 0 equal branch_false L50003 push_event // talker push_const 40 add fetch_i // level push_const 1092 add fetch_i push_const 70 greater branch_false L50001 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 0 push_const 25000000 negate func_call 184746219 // func[IncrementParam] shift_sp -3 shift_sp -1 jump L50006 L50003 push_event // reply push_const 164 add fetch_i4 push_const 1 equal branch_false L50004 push_event // talker push_const 40 add fetch_i // level push_const 1092 add fetch_i push_const 60 greater branch_false L50001 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 0 push_const 3500000 negate func_call 184746219 // func[IncrementParam] shift_sp -3 shift_sp -1 jump L50006 L50004 push_event // reply push_const 164 add fetch_i4 push_const 2 equal branch_false L50005 push_event // talker push_const 40 add fetch_i // level push_const 1092 add fetch_i push_const 50 greater branch_false L50001 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 0 push_const 1000000 negate func_call 184746219 // func[IncrementParam] shift_sp -3 shift_sp -1 jump L50006 L50005 push_event // reply push_const 164 add fetch_i4 push_const 3 equal branch_false L50000 push_event // talker push_const 40 add fetch_i // level push_const 1092 add fetch_i push_const 40 greater branch_false L50001 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_const 0 push_const 500000 negate func_call 184746219 // func[IncrementParam] shift_sp -3 shift_sp -1 jump L50006 L50001 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnLowLevel func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L50000 L50006 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnDoneDecrease func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L50000 L50000 call_super handler_end class_end Code:
class clavier : teleporter Code:
class clavier : teleporter_decreaseexp teleporter_lowlevel.htm: Code:
<html> <head> <body> Your level is too low you can't decrease your exp anymore. </body> </head> </html> Code:
<html> <head> <body> Your exp has been decreased! Have fun!<br><br> <center><a action="bypass -h menu_select?ask=100&reply=0">Level 70~80</a><br></center><br1> <center><a action="bypass -h menu_select?ask=100&reply=1">Level 60~70</a><br></center><br1> <center><a action="bypass -h menu_select?ask=100&reply=2">Level 50~60</a><br></center><br1> <center><a action="bypass -h menu_select?ask=100&reply=3">Level 40~50</a><br></center><br> </body> </head> </html> ![]() ![]()
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Aug 2005
Posts: 605
|
good lord:P useful for bounty hunters. Can you make it give you an item everytime it decreases your xp?
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 394
|
Yes i can write that for you in a sec...
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Aug 2005
Posts: 394
|
Use this code if you want to give an item to someone after his exp has been decreased.
Change this line for which item and how much Code:
push_const 110 // Item ID, 110 = Doom Shield. push_const 1 // How Much Code:
class teleporter_decreaseexp : teleporter
parameter_define_begin
string fnLowLevel "teleporter_lowlevel.htm"
string fnDoneDecrease "teleporter_donedecrease.htm"
parameter_define_end
handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // ask
push_const 100
add
fetch_i
push_const 100
equal
branch_false L50000
push_event // reply
push_const 104
add
fetch_i
push_const 0
equal
branch_false L50003
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 70
greater
branch_false L50001
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 0
push_const 25000000
negate
func_call 171 // func[IncrementParam]
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 110 // Item ID, 110 = Doom Shield.
push_const 1 // How Much
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
jump L50006
L50003
push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L50004
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 60
greater
branch_false L50001
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 0
push_const 3500000
negate
func_call 171 // func[IncrementParam]
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 110 // Item ID, 110 = Doom Shield.
push_const 1 // How Much
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
jump L50006
L50004
push_event // reply
push_const 104
add
fetch_i
push_const 2
equal
branch_false L50005
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 50
greater
branch_false L50001
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 0
push_const 1000000
negate
func_call 171 // func[IncrementParam]
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 110 // Item ID, 110 = Doom Shield.
push_const 1 // How Much
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
jump L50006
L50005
push_event // reply
push_const 104
add
fetch_i
push_const 3
equal
branch_false L50000
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 40
greater
branch_false L50001
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 0
push_const 500000
negate
func_call 171 // func[IncrementParam]
shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 110 // Item ID, 110 = Doom Shield.
push_const 1 // How Much
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
jump L50006
L50001
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_parameter fnLowLevel
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L50000
L50006
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_parameter fnDoneDecrease
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L50000
L50000
call_super
handler_end
class_end
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Aug 2005
Posts: 36
|
instead of decreasing exp you could just decrease the level by 1 per click... just look up the param option 0-6 to find the right one.
duante |
|
|
|
|
#6 |
|
Архивный участник
Join Date: Feb 2005
Posts: 357
|
nope cos IncrementParam level is not permanent.
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: May 2005
Posts: 52
|
I thought the permanent ones were: level, exp, sp, and something else...isnt it ? O.o
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Feb 2005
Posts: 357
|
i could be wrong but i remember testing it and only exp and sp was permanent.
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: Aug 2005
Posts: 394
|
Sorry for bumping this topic.
Someone requested an updated version of this. I included the html just dont forget to save it as unicode. This new script is fully supported by C4. |
|
|
|
|
#10 |
|
Архивный участник
Join Date: Jun 2006
Posts: 8
|
thank you for sharing
|
|
|
|
|
#11 |
|
Архивный участник
Join Date: Jan 2007
Posts: 61
|
Script don`t work for me. AI have more errors. PLIZ post there put this script.
|
|
|
|
|
#12 |
|
Архивный участник
Join Date: Jun 2006
Posts: 153
|
umm.. this post is from 2 years ago.. meaning that it doesnt work with C4 server -.-
|
|
|
|
|
#13 | |
|
Архивный участник
Join Date: Jan 2006
Posts: 607
|
Quote:
|
|
|
|
|
|
#14 |
|
Архивный участник
Join Date: Apr 2005
Posts: 122
|
Thank you for the share working great
|
|
|
|
|
#15 |
|
Архивный участник
Join Date: Jun 2006
Posts: 64
|
Please excuse my ignorance but Im am trying to understand the structure of the ai.
Where in the ai should this script be placed, and if you wouldn't mind, a short explanation as to why it goes there and not just placed anywhere. Thanks Rexx |
|
|
|
|
#16 |
|
Архивный участник
Join Date: May 2006
Posts: 237
|
i just place AI at the end of the file seems to work fine :P
|
|
|
|
|
#17 |
|
Архивный участник
Join Date: Jun 2006
Posts: 64
|
Thanks Nish
I tried that but got all sorts of errors when the NPC's loaded, but at least I know thats were you put yours and it worked for you. Going through the error logs, it looks like the main error is : Cannont find AI class [default_maker] I will take another look at my AI as I too have added other scripts to my AI with no problems before. Did you leave your class heading as in the post: "class teleporter_decreaseexp : teleporter", or did you change it to "class 1 teleporter_decreaseexp : teleporter", |
|
|
|
|
#18 |
|
Архивный участник
Join Date: May 2006
Posts: 237
|
default maker is a npcpos error im pretty sure there is a fix for that somewhere here not sure where since its a older topic.... try a search
|
|
|
|
|
#19 |
|
Архивный участник
Join Date: Jun 2006
Posts: 64
|
For those having difficulty with this, here is what I did to get it to work.
Thanks to Phantom for the share. Adding the line to every gate keepers html you wish to have the function worked , no problems there. <a action="link teleporter_decreaseexp.htm">Decrease my experience.</a> After that it all went wrong for me. Fix for my server but not all, maybe I have a different AI to some. You must change the AI from the original post to class 1 eg: class teleporter_decreaseexp : teleporter (original post) class 1 teleporter_decreaseexp : teleporter (my server) This class must be added to your AI before the gatekeeper you wish to have the function. eg find clavier and add this class above or before clavier. This must be added to every gate keeper you wish to have the function. Then you must change class 1 clavier : teleporter to class 1 clavier : teleporter_decreaseexp and the same for any other gate keepers you have given this function too. Then make you html as you desire. Here is mine if you wish to use them as an example teleporter_decreaseexp.htm <html> <head> <body> Choose the amount of EXP you would like me to suck from you<br><br> <center><a action="bypass -h menu_select?ask=100&reply=0">Decrease my EXP by 25000000</a><br></center><br1> <center><a action="bypass -h menu_select?ask=100&reply=1">Decrease my EXP by 3500000</a><br></center><br1> <center><a action="bypass -h menu_select?ask=100&reply=2">Decrease my EXP by 1000000</a><br></center><br1> <center><a action="bypass -h menu_select?ask=100&reply=3">Decrease my EXP by 500000</a><br></center><br> </body> </head> </html> teleporter_donedecrease.htm <html> <head> <body> Your sole has been sucked of EXP<br> <br> <br> <a action="link teleporter_decreaseexp.htm">Have you sole sucked again.</a> </body> </head> </html> teleporter_lowlevel.htm <html> <head> <body> Your level is too low you can't decrease your exp anymore. </body> </head> </html> Sorry about not putting the html into code, not sure how to do that. Hope this helps those having problems implementing this option to there servers. It seems Phantoms method worked for some servers but not for others, I am not at all saying his method is incorrect. Thanks again for sharing. Rexx |
|
|
|
|
#20 |
|
Архивный участник
Join Date: Jul 2006
Posts: 81
|
great share
**off topic** is there any type of guide for ai scripting the c4 fetch_i const? tryig to learn it myself for future stuff i seen the function post and thats about it |
|
|
|
|
#21 |
|
Архивный участник
Join Date: Oct 2006
Posts: 108
|
I wanted to add some search key words to this thread cause I had some trouble finding it:
Delevel, deleveling, reduce, experience, sp, exp, xp |
|
|
|
|