Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 27.10.2005, 10:03   #1
Phantom2005
Архивный участник
 
Join Date: Aug 2005
Posts: 394
Default [Share]Exp decreasing npc.

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>
Example clavier001.htm:
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>
IMPORTANT NOTE: Add this class before all teleporter classes(clavier for example)
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
Now you have to open ai.obj and change:
Code:
class clavier : teleporter
to
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>
event_donedecrease.htm:
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>


Phantom2005 is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:01.