Jump to content
  • 0

Help me! problem with my script


hthuong

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

my script

mellina,33,78,4	script	Kinh Doanh Nhà Đất::guildreward	899,{
mes "[^0000FFKinh Doanh Nhà Đất^000000]";
mes "Ta đang có miếng đất trống đây ngươi có muốn mua không?";
next;
switch(select("Guild Home" ,
			( getgroupid() < 99) ?"":"^FF0000[GM]^000000 Set Winner Guild" )
){
	case 1:
	if (getcharid(2) != .GuildID)
	{
		mes "[^0000FFKinh Doanh Nhà Đất^000000]";
		mes "Dường như ngươi đến trể mất rồi tên GM Server mRO hắn mua đứt miếng đất này rồi";
		mes "Hình như hắn mua cho Guild nào thắng WoE đó. Hmm. Mà hình như ngươi không nằm trong guild chiến thành WoE";
		mes "Thôi by gặp lại sau nhé ";
		break;
	}
	else
	{
		warp "home_r01",0,0;
		break;
	}
	case 2:
	goto GMCustom;
}
close;

GMCustom:
mes "Vui lòng nhập ID của guild đc phép vào GUILD HOUSE";
mes "Guild hiện đang được vào GUILD HOUSE là guld ^FF0000" + getguildname(.GuildID) + "^000000 có ID ^FF0000" + .GuildID + "^000000";
next;
input .@guild_id;
set .GuildID,.@guild_id;
mes "Done !";
close;

/* Set guild id */
OnInit:
set .GuildID,1;


/* check when pc warp to map */
OnPCLoadMapEvent:
//if (getgroupid() > 0) end;
if (strcharinfo(3) == "home_r01")
{
	if (getcharid(2) != .GuildID)
	{
		mes "[^0000FFKinh Doanh Nhà Đất^000000]";
		mes "Quá hạn thanh toán ....";
		close2;
		savepoint "mellina",85,55;
		atcommand "@load";
	}
}
}

home_r01	mapflag	 loadevent
home_r01	mapflag	nomemo

Why if have 2 line below script will return error?

   	 mes "[^0000FFKinh Doanh Nhà Đất^000000]";
		mes "Quá hạn thanh toán ....";
		close2;

error

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: strcharinfo (1 parameter):
[Debug]: Data: number value=3
[Debug]: Source (NPC): Kinh Doanh Nhà Đất at mellina (33,78)

Edited by hthuong
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

OnInit:
set .GuildID,1;
end;        <----------------- ADD ---------------

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

Still not work.

Warning


[Warning]: npc_scriptcont: failed npc_checknear test.
[/Code]

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

npc_checknear results when a player is not in sight range of the NPC they are using.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

That mean i will have create new npc to check map load event in home_r01?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

I think it's the 'mes' command which causes the error off-screen; try changing that to 'dispbottom' and see if you still get the error. If you do, then yeah, you'll need a new NPC (with no coordinates).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

Thankyou!

Edited by hthuong
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...