Budots Posted December 3, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 200 Reputation: 1 Joined: 09/25/13 Last Seen: January 6, 2014 Share Posted December 3, 2013 Can i request for a script that will give item on ALL PLAYERS IN THE MAP and also ALL PLAYERS IN THE SERVER?Is it possible?Thanks in advance Quote Link to comment Share on other sites More sharing options...
Patskie Posted December 3, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted December 3, 2013 *addrid(<type>{,<flag>{,<parameters>}}); This command will attach other RIDs to the current script without detaching the invoking RID. It returns 1 if successful and 0 upon failure. <type> determines what RIDs are attached: 0: All players in the server. 1: All players in the map of the invoking player, or the invoking NPC if no player is attached. 2: Party members of a specified party ID. [ Parameters: <party id> ] 3: Guild members of a specified guild ID. [ Parameters: <guild id> ] 4: All players in a specified area of the map of the invoking player (or NPC). [ Parameters: <x0>,<y0>,<x1>,<y1> ] Account ID: The specified account ID. <flag> can prevent certain players from being attached: 0: Players are always attached. (default) 1: Players currently running another script will not be attached. // map of invoking character or npc addrid(1); getitem 7227,5; // whole server addrid(0); getitem 7227,5; 2 Quote Link to comment Share on other sites More sharing options...
Budots Posted December 3, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 200 Reputation: 1 Joined: 09/25/13 Last Seen: January 6, 2014 Author Share Posted December 3, 2013 sir pat can you make one for me? Quote Link to comment Share on other sites More sharing options...
Patskie Posted December 3, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted December 3, 2013 Try : http://pastebin.com/raw.php?i=QfcKMru3 Quote Link to comment Share on other sites More sharing options...
Talaysen Posted December 31, 2013 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 161 Reputation: 5 Joined: 02/07/13 Last Seen: March 25, 2016 Share Posted December 31, 2013 It doesn't do anything. When I click the NPC, it asks me to enter an item ID, but doesn't give me a field to enter it in. I get this error: [Warning]: Unexpected type for argument 1. Expected string. [Debug]: Data: variable name='.@id' index=0 [Debug]: Function: mes [Debug]: Source (NPC): Etienne at prontera (150,150) [Error]: buildin_getitem: Nonexistant item 0 requested. [Debug]: Source (NPC): Etienne at prontera (150,150) Note: I renamed the NPC to Etienne. Quote Link to comment Share on other sites More sharing options...
Patskie Posted December 31, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted December 31, 2013 I have change the link of my previous post. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 31, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 31, 2013 (edited) I tried the script I input 1 [Error]: buildin_getitem: Nonexistant item 1 requested. [Debug]: Source (NPC): Sample at prontera (150,150)getitemname return "null" when it item ID wasn't found BUILDIN_FUNC(getitemname) ..... if (i_data == NULL) { script_pushconststr(st,"null"); return 0; }also [Debug]: Source (NPC): Sample at prontera (150,150) [Warning]: Incorrect use of 'close' command! (source:Sample / path:@ßX)when attaching an ID that wasn't talking to an npcthat ID should've use end; instead of close ... also, the .@id is a scope variable using addrid attach the rid on other players, has to use .id <-- npc variable I think I do ... wait I edit ok prontera,150,150,0 script Sample 123,{ if ( getgmlevel() < 99 ) end; mes "Input item id"; next; input .itemid; if ( getitemname( .itemid ) == "null" ) { mes "non-existant id"; close; } .@origin = getcharid(3); addrid 0; // 0 or 1 getitem .itemid, 1; if ( .@origin == getcharid(3) ) close; else end; } @Patskie I remember I kept saying this before last year ... scripting section is not a place that you throw them with script_commands.txt and expect them to write out themselves sometimes there are unseen bug that only experienced scripters can point it out and even if they are able to produce a properly working script, without guidance, their script will be unoptimized one Edited December 31, 2013 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Patskie Posted December 31, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted December 31, 2013 Problem with me is that i always make a script and never test it that is why even small bugs/error slip unto me. Quote Link to comment Share on other sites More sharing options...
Question
Budots
Can i request for a script that will give item on ALL PLAYERS IN THE MAP and also ALL PLAYERS IN THE SERVER?
Is it possible?
Thanks in advance
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.