Damn this is pissing me off. For some reason when I try to use my script it says that my player is not attached. Eeff it, here's the actual script.
prontera,155,150,3 script TEST_NPC1 99,{ // Loop to check if player has the required items for(.@i = 0; .@i < getarraysize(.qitem[0]); .@i++) { if(countitem(.qitem[.@i] >= .qamt) { mes .npc_name$; mes "congrats dialogue for gather items."; delitem .qitem[.@i],.qamt; getitem .pitem,.pamt; close; } } // Dialogue if player does NOT have the required items already mes .npc_name$; mes "dialogue hereeeee."; mes "More hereeeee"; next; mes .@player_name$; mes "PC dialogue here"; next; if(select("Yes, please.:No, thank you.") == 2) { mes .npc_name$; mes "leaving message here"; close; } mes .npc_name$; mes "more dialogue"; next mes .npc_name$; mes "Come back with:"; // List items for(.@i = 0; .@i < getarraysize(.qitem[0]); .@i++) mes "^FF0000"+ .qamt +"x - "+ getitemname(.qitem[.@i]) +"^000000"; mes "...and I will give you the item."; close;OnInit: // Configuration // General .npc_name$ = "[^008800NPC_NAME^000000]"; // NPC's dialogue name .@player_name$ = "[^FF0000"+strcharinfo(0)+"^000000]"; // Items .pitem = 901; // Prize item for completing the quest .pamt = 1; // Prize item amount setarray .qitem[0], 501, 502, 503; .qamt = 1; // Quest item amount end;}
I guess I should mention that I'm getting this strange error as well, even though I don't have that in my script ._. .
[Error]: npc_read_event_script: detected possible use of wrong case in a script. Found '::OnPcLoginEvent', probably meant to be '::OnPCLoginEvent' (in 'OnPCLoginEvent').