Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 25.04.2007, 02:42   #1
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default [SHARE] Public Wyvern

Thats isnt retail, of course, but maybe someone will find it interesting, i do it after read this thread -> https://postpacific.loc-online.com/f...ead.php?t=7432

You can ride a Wyvern if you have a strider of level 55 at least for the price you wish, by default is setted to 1kk of Adena.

NASC code
Code:
class public_wyvern : default_npc {

parameter:
  string fnHi = "public_wyvern001.htm";
  string fnYouAreChaotic = "public_wyvern003.htm";
  string fnRideWyvern = "public_wyvern004.htm";
  string fnNotEnoughAdena = "public_wyvern005.htm";
  string fnStriderNotReady = "public_wyvern006.htm";
  int Item = 57;
  int Amount = 1000000;
  int ride_wyvern_level = 55;

handler:
  EventHandler TALKED(talker) {
    if (talker.karma > 0) myself->ShowPage(talker,fnYouAreChaotic);
    else myself->ShowPage(talker,fnHi);
  }

  EventHandler MENU_SELECTED(talker,ask,reply) {
    if (ask == -202) {
      if ((talker.yongma_type == 1) && (talker.strider_level >= ride_wyvern_level)) {
        if (myself->OwnItemCount(talker,Item) >= Amount) {
          myself->DeleteItem1(talker,Item,Amount);
          myself->RideWyvern(talker,1012621);
          myself->ShowPage(talker,fnRideWyvern);
        }
        else myself->ShowPage(talker,fnNotEnoughAdena);
      }
      else myself->ShowPage(talker,fnStriderNotReady);
    }
  }

}
Compiled code
Code:
class 1 public_wyvern : default_npc
parameter_define_begin
        string fnHi "public_wyvern001.htm"
        string fnYouAreChaotic "public_wyvern003.htm"
        string fnRideWyvern "public_wyvern004.htm"
        string fnNotEnoughAdena "public_wyvern005.htm"
        string fnStriderNotReady "public_wyvern006.htm"
        int Item 57
        int Amount 1000000
	int ride_wyvern_level 55
parameter_define_end

handler 3 38	//  TALKED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  talker
	push_const 40
	add
	fetch_i	//  karma
	push_const 468
	add
	fetch_i4
	push_const 0
	greater
	branch_false L2
L1
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnYouAreChaotic
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	jump L3
L2
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnHi
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L3
handler_end

handler 32 118	//  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 202
	negate
	equal        
	branch_false L5
L4
	push_event	//  talker
	push_const 40
	add
	fetch_i	//  yongma_type
	push_const 836
	add
	fetch_i4
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_false L6
	push_event	//  talker
	push_const 40
	add
	fetch_i	//  strider_level
	push_const 2080
	add
	fetch_i4
	push_parameter ride_wyvern_level
	greater_equal
	and
L6
	branch_false L7
L8
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter Item
	func_call 184680579	//  func[OwnItemCount]
	shift_sp -2
	push_parameter Amount
	greater_equal
	branch_false L10
L9
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter Item
	push_parameter Amount
	func_call 184746114	//  func[DeleteItem1]
	shift_sp -3
	shift_sp -1
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_const 1012621
	func_call 184680717	//  func[RideWyvern]
	shift_sp -2
	shift_sp -1
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnRideWyvern
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	jump L12
L10
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnNotEnoughAdena
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L12
	jump L13
L7
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnStriderNotReady
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L5
L11
L13
handler_end

class_end
npcdata.txt
Code:
npc_begin	citizen	15106	[public_wyvern]	level=70	acquire_exp_rate=0	acquire_sp=0	unsowing=1	clan={}	ignore_clan_list={}	clan_help_range=300	slot_chest=[]	slot_rhand=[]	slot_lhand=[]	shield_defense_rate=0	shield_defense=0	skill_list={@s_full_magic_defence}	npc_ai={[public_wyvern];{[fnHi]=[public_wyvern001.htm]};{[fnYouAreChaotic]=[public_wyvern003.htm]};{[fnRideWyvern]=[public_wyvern004.htm]};{[fnNotEnoughAdena]=[public_wyvern005.htm]};{[fnStriderNotReady]=[public_wyvern006.htm]};{[Item]=@adena};{[Amount]=1000000}}	category={}	race=human	sex=female	undying=1	can_be_attacked=0	corpse_time=1	no_sleep_mode=0	agro_range=0	ground_high={120;0;0}	ground_low={50;0;0}	exp=429634528	org_hp=2444.5	org_hp_regen=7.5	org_mp=1345.8	org_mp_regen=2.7	collision_radius={8;8}	collision_height={25;25}	str=40	int=21	dex=30	wit=20	con=43	men=10	base_attack_type=sword	base_attack_range=40	base_damage_range={0;0;80;120}	base_rand_dam=30	base_physical_attack=6xx.xx373	base_critical=4	physical_hit_modify=4.75	base_attack_speed=253	base_reuse_delay=0	base_magic_attack=470.4	base_defend=2xx.xx	base_magic_defend=2xx.xx	physical_avoid_modify=0	soulshot_count=0	spiritshot_count=0	hit_time_factor=0.6	item_make_list={}	corpse_make_list={}	additional_make_list={}	additional_make_multi_list={}	hp_increase=0	mp_increase=0	safe_height=100	npc_end
npc_pch.txt
Code:
[public_wyvern]	=	1015106
And now examples of the htmls, you can make your owns...

public_wyvern001.htm
Code:
<html><body> 
Public Wyvern:<br>
<br>
<a action="link public_wyvern002.htm">[Ride Wyvern]</a>
</body></html>
public_wyvern002.htm
Code:
<html><body> 
Public Wyvern:<br>
Are you sure?, you will need 1kk of Adena in order to ride an Wyvern<br>
<br>
<a action="bypass -h menu_select?ask=-202">[Yes, ride Wyvern]</a>
</body></html>
public_wyvern003.htm
Code:
<html><body>
Public Wyvern:<br>
<br>
I have nothing to say to a scoundrel like you! Get out of my sight, or I'll give you a taste of my fist.
</body></html>
public_wyvern004.htm
Code:
<html><body>
Public Wyvern:<br>
<br>
You have ridden the wyvern! Please remember to keep it well-fed.
</body></html>
public_wyvern005.htm
Code:
<html><body>
Public Wyvern:<br>
<br>
Not enough <font color="LEVEL">Adena</font>! 
</body></html>
public_wyvern006.htm
Code:
<html><body>
Public Wyvern:<br>
<br>
To transform a Strider into a Wyvern, ride a <font color="LEVEL">Strider of at least level 55</font> and have <font color="LEVEL">1kk Adena</font>.
</body></html>

And now yes, client side is missing in this share... make your own... or you will see gigant and demonic rabbits.
FidoW is offline  
Old 25.04.2007, 14:17   #2
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

Wow, you took the effort to compile the code and share that huge part of work. Thanks for your share!
Aikeleer is offline  
Old 25.04.2007, 14:53   #3
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Take me less than an hour yesterday im starting to do it faster and faster each time...
FidoW is offline  
Old 25.04.2007, 15:19   #4
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

haha, nice fidow =p
i like the idea tbh
tho..it would mean in a sense everyone would have wyvern in the server ..but still sounds pretty good =p giving me another idea =p
tpuNIsher is offline  
Old 25.04.2007, 17:33   #5
Jarohe
Архивный участник
 
Join Date: Apr 2007
Posts: 13
Default

Thanks Fidow
Jarohe is offline  
Old 30.04.2007, 05:37   #6
rodier
Архивный участник
 
Join Date: May 2005
Posts: 979
Default

thanks a lot. It is possible to modify how long wyvern stay?
rodier is offline  
Old 30.04.2007, 06:15   #7
seungmo
Архивный участник
 
Join Date: Feb 2006
Posts: 22
Default

Fidow nice~~~
Thanks~~
seungmo is offline  
Old 11.05.2007, 10:10   #8
blackman
Архивный участник
 
Join Date: Apr 2007
Posts: 26
Default

I have this error
[last-send]ublic_wivern002.htm][recived menu_select?ask=-202] : INVALID LINK
plz help
blackman is offline  
Old 21.05.2007, 15:38   #9
citruz
Архивный участник
 
Join Date: May 2006
Posts: 23
Default

Quote:
Originally Posted by blackman View Post
I have this error
[last-send]ublic_wivern002.htm][recived menu_select?ask=-202] : INVALID LINK
plz help
Isn't "public_wyvern..." ??? x)
citruz is offline  
Old 25.05.2007, 09:59   #10
blackman
Архивный участник
 
Join Date: Apr 2007
Posts: 26
Default

oh, yes, public_wyvern... but do not working anyway (((
[recived menu_select?ask=-202] : INVALID LINK
blackman is offline  
Old 26.05.2007, 11:18   #11
Xakep
Архивный участник
 
Join Date: May 2007
Posts: 208
Default

where NPC???? oO
Xakep is offline  
Old 27.05.2007, 22:51   #12
Ra1n0
Архивный участник
 
Join Date: Feb 2007
Posts: 139
Default

Quote:
where NPC???? oO
make your own npcpos
Ra1n0 is offline  
Old 03.07.2007, 07:54   #13
Xakep
Архивный участник
 
Join Date: May 2007
Posts: 208
Default

Empty window when you press NPC><

What to do?
Xakep is offline  
 


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 21:02.