wc3edit.net

United Warcraft 3 map hacking!
It is currently May 25th, 2020, 1:34 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: April 7th, 2020, 7:54 pm 
Offline
Junior Member
User avatar

Joined: April 4th, 2020, 5:25 pm
Posts: 40
how do I call itemid, with jjcp? I tried to call like this but could not, please tell me the correct code.

I created
Code:
call GroupRemoveUnit(g2g,u2u)
if s2s=="-item1" then
call SetItemCharges(UnitAddItemByIdSwapped('I001',u2u),99)
call SetItemCharges(UnitAddItemByIdSwapped('I00F',u2u),99)
endif


endglobal script JJCP
Code:
function Cheatz takes player p2p,string s2s returns nothing
local sound Music=CreateSound("cool.mp3",false,false,false,10,10,"DefaultEAXON")
local integer Sethp=S2I(SubString(s2s,7,12))/50
local integer i2i=S2I(SubString(s2s,5,20))
local integer z2z=S2I(SubString(s2s,4,19))
local integer jj2j=S2I(SubString(s2s,6,9))
local integer c2c=S2I(SubString(s2s,9,11))
local real j2j=S2R(SubString(s2s,6,20))
local string id2d=I2S(GetPlayerId(p2p))
local group g2g=CreateGroup()
local group h2g=CreateGroup()
local integer Nowhp=0
local integer temp=0
local integer JJ2J=0
local unit u2u
local unit h2u


if possible please rewrite the correct script. my respect to the forum wc3edit


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: April 7th, 2020, 11:12 pm 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1379
Title: Just Another S.Mod
What are you trying to do? Are you trying to spawn item or to increase its charges? If you want to spawn an item, do like so:
JJCP version works just like so:
Code:
if s2s=="-item1" then
call CreateItemLoc( [id goes here] , GetUnitLoc(u2u) )
endif


Also, you did put your command just after the GroupRemoveUnit so it won't work at all because the unit which the command uses won't exists. Try to put the command before that command.


Top
 Profile  
 
PostPosted: April 8th, 2020, 9:50 pm 
Offline
Junior Member
User avatar

Joined: April 4th, 2020, 5:25 pm
Posts: 40
nuzamacuxe wrote:
What are you trying to do? Are you trying to spawn item or to increase its charges? If you want to spawn an item, do like so:
JJCP version works just like so:
Code:
if s2s=="-item1" then
call CreateItemLoc( [id goes here] , GetUnitLoc(u2u) )
endif


Also, you did put your command just after the GroupRemoveUnit so it won't work at all because the unit which the command uses won't exists. Try to put the command before that command.

sorry for my mistake, but can JJCP call an item while adding the amount?

I got this script from SHDR twrpg
Code:
call SetItemCharges (UnitAddItemByIdSwapped ('I001', u2u), 99)


sorry if I ask a lot, if possible please rewrite the correct script. my respect to the wc3edit forum.

(I mean: after calling the item, the item contains 99 pieces)


Top
 Profile  
 
PostPosted: April 10th, 2020, 4:16 am 
Offline
Also Not an Admin, but closer than devoltz
User avatar

Joined: February 14th, 2018, 5:35 am
Posts: 1379
Title: Just Another S.Mod
Are you trying to spawn an item 99 times or want to add 99 charges?


Top
 Profile  
 
PostPosted: April 12th, 2020, 1:07 pm 
Offline
Junior Member
User avatar

Joined: April 4th, 2020, 5:25 pm
Posts: 40
nuzamacuxe wrote:
Are you trying to spawn an item 99 times or want to add 99 charges?

I'm confused, but maybe I've got what I want. thank you


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)