Jump to content
  • 0

Help auto give event like lineage II curse sword


newsubzero

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   2
  • Joined:  05/15/12
  • Last Seen:  

i want to make NPC auto give but error like this

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Source (NPC): dmdmswd at prontera (0,0)
[Warning]: script:get_val: cannot access player variable 'domswd', defaulting to 0

this is idea :

- NPC random time every 7 day to player who online except in vending,

- if player not online or online that item will delete automatically before random player get that.

- if player die item will lost.

- player who have that item can kill by other player

- if other player kill that player who have that item, other player will have that item.

- item can't be taken off, after equipped.

help me what should i do with my script ?

this is my start script

prontera,0,0,0 script dmdmswd -1,{
OnInit:
OnClock0000:
set .DmdTime,rand(24);
OnMinute00:
if( gettime(3) == .DmdTime ){
set .DelayMin,rand(60);
sleep ( .DelayMin * 60000 * 7 );
while(1){
 query_sql "select account_id from 'char' where online = 1 order by rand() limit 1", .@onl;
 attachrid .@onl;
 if( CheckVending() ){
  DetachRID();
  continue;
  }
 announce strcharinfo(0) +" won in 666 Sword.", 0;
 query_sql "DELETE FROM Inventory WHERE nameid='27666'";
 getitem 27666,1;
 set domswd, 1;
 break;
 }
}
if (domswd >= 1){
 OnPCDieEvent:
 dispbottom "Holy Shit you died!";
 dispbottom "Your Weapon will gone!";
 query_sql "DELETE FROM Inventory WHERE nameid='27666'";
 set domswd, 0;
 end;
  }
end;
}

i'm sory my english not good

[solved] invalid syntax /sry

Edited by newsubzero
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...