Jump to content
  • 0

showevent with different npc


MukkiesftKies

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

Hello, i would like to try use showevent using different npc but error.

 

This npc works like this.
When new player login, the emotion will show at Newbie Gift NPC.
 

prontera,164,174,4	script	Newbie Gift	115,{
if( !#Freebiess ){
	set #Freebiess,1;
	mes "Welcome...this is your gift...";
	getitem 1530,1;
	showevent 0,0;
	}else{
	mes "You have claim the Reward already.";
	}
	close;

OnNewbie:
  showevent 1,0;
end;

}

-	script	loginaa	-1,{
OnPCLoginEvent:
donpcevent "Receptionist::OnNewbie";
end;
}

 

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: showevent (2 parameters):
[Debug]: Data: number value=1
[Debug]: Data: number value=0
[Debug]: Source (NPC): Receptionist at prontera (164,174)

 

Edited by MukkiesftKies
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Problem here is: donpcevent requires a player to be attached, while doevent does not.

Additionally, your thinking too hard for this, and in a result made it over complicated. You can just combine both of those scripts....

prontera,164,174,4	script	Newbie Gift	115,{
if( !#Freebiess ){
	set #Freebiess,1;
	mes "Welcome...this is your gift...";
	getitem 1530,1;
	showevent 0,0;
	}else{
	mes "You have claim the Reward already.";
	}
	close;

OnPCLoginEvent:
if(!#Freebiess){ showevent 1,0; }
end;

}

There, I combined them, also, I changed it to check to see if they received the Item when they login, so it only does " showevent 1,0 " when a NEW account logs in, not just anybody.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

I use the example at rathena/eathena and combine but be like that.

 

so OnPCLoadMapEvent: no function for showevent and without OnPCLoadMapEvent: can use for showevent ??

 

 

btw thanks, your script very simple. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Don't quite understand what you meant... but this script doesn't use OnPCLoadMapEvent. It uses, OnPCLoginEvent.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...