vadimrex / jasstots Goto Github PK
View Code? Open in Web Editor NEWJass to typescript translator
License: MIT License
Jass to typescript translator
License: MIT License
function a takes nothing returns nothing
local real b =-1
endfunction
cant work with "=-"
lexeing
Unhandled exception. System.Exception: Line 1, Col 20: wrong operator
at Jass.JassLexer.TryParseOperator()
at Jass.JassLexer.Tokenize(String source)
at JassToTs.Program.TranslateFile(String ipath, String opath, String tpath)
at JassToTs.Program.Main(String[] args)
if ((DzAPI_Map_HasMallItem(YDLocal2Get(player, "wj"), "ZY100") == true)) then
call YDUserDataSet(player, YDLocal2Get(player, "wj"), "swe_add_gold", integer, 105)
else
endif
can you convert to only have if! the else is empty.the jass code is by gui convert jass
we have FourCC("qzk1") can covert
1903848241 /*'qzk1'*/
so can you replace 1903848241 /'qzk1'/ to FourCC("qzk1")
just need to convert what you can convert,and then our can Manual inspection。3qu。
jass demo:
function Trig_heduim_base_map_init_______uFunc008003001 takes nothing returns boolean
return (((GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER) and (GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING)))
endfunction
function Trig_heduim_base_map_init_______uFunc009A takes nothing returns nothing
call YDLocal2Set(player, "wj", GetEnumPlayer())
call YDLocal2Set(location, "d", GetPlayerStartLocationLoc(YDLocal2Get(player, "wj")))
call SetCameraFieldForPlayer( YDLocal2Get(player, "wj"), CAMERA_FIELD_TARGET_DISTANCE, 2500.00, 0 )
call AdjustPlayerStateBJ( 800, YDLocal2Get(player, "wj"), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 20, YDLocal2Get(player, "wj"), PLAYER_STATE_RESOURCE_LUMBER )
call AdjustPlayerStateBJ( 2, YDLocal2Get(player, "wj"), PLAYER_STATE_RESOURCE_FOOD_CAP )
call CreateNUnitsAtLoc( 1, 'Qzu2', YDLocal2Get(player, "wj"), GetPlayerStartLocationLoc(YDLocal2Get(player, "wj")), bj_UNIT_FACING )
call YDUserDataSet(player, YDLocal2Get(player, "wj"), "swe_add_gold", integer, 5)
call YDUserDataSet(player, YDLocal2Get(player, "wj"), "swe_add_wood", integer, 1)
if ((DzAPI_Map_HasMallItem(YDLocal2Get(player, "wj"), "ZY50") == true)) then
call YDUserDataSet(player, YDLocal2Get(player, "wj"), "swe_add_gold", integer, 55)
else
endif
if ((DzAPI_Map_HasMallItem(YDLocal2Get(player, "wj"), "ZY100") == true)) then
call YDUserDataSet(player, YDLocal2Get(player, "wj"), "swe_add_gold", integer, 105)
else
endif
call SuspendHeroXP( bj_lastCreatedUnit, true )
call UnitAddItemByIdSwapped( 'q0uk', bj_lastCreatedUnit )
call PanCameraToTimedLocForPlayer( YDLocal2Get(player, "wj"), YDLocal2Get(location, "d"), 0.01 )
call RemoveLocation( YDLocal2Get(location, "d") )
endfunction
function Trig_heduim_base_map_init_______uActions takes nothing returns nothing
YDLocalInitialize()
call SetTimeOfDay( 8.00 )
call SetTimeOfDayScale( 0 )
call SetPlayerState( Player(11), PLAYER_STATE_GIVES_BOUNTY, 1 )
call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
call CreateFogModifierRectBJ( true, Player(10), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
call CreateFogModifierRectBJ( true, Player(11), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
call YDLocal1Set(force, "wjz", GetPlayersMatching(Condition(function Trig_heduim_base_map_init_______uFunc008003001)))
call ForForce( YDLocal1Get(force, "wjz"), function Trig_heduim_base_map_init_______uFunc009A )
call DestroyForce( YDLocal1Get(force, "wjz") )
call DestroyTrigger( GetTriggeringTrigger() )
call YDLocal1Release()
endfunction
//===========================================================================
function InitTrig_heduim_base_map_init_______u takes nothing returns nothing
set gg_trg_heduim_base_map_init_______u = CreateTrigger()
#ifdef DEBUG
call YDWESaveTriggerName(gg_trg_heduim_base_map_init_______u, "heduim_base_map_init 复制")
#endif
call TriggerRegisterTimerEventSingle( gg_trg_heduim_base_map_init_______u, 0.50 )
call TriggerAddAction(gg_trg_heduim_base_map_init_______u, function Trig_heduim_base_map_init_______uActions)
endfunction
jass:
call DisplayTimedTextToPlayer( YDLocal2Get(player, "wj"), 0, 0, 5.00, YDWEOperatorString3("|cffffff00感谢您购买了【商城基础道具】,系统已为您增加了", I2S(YDLocal2Get(integer, "int")), "资源!") )
ts:
DisplayTimedTextToPlayer(wj, 0, 0, 5.00, YDWEOperatorString3("|cffffff00感谢您购买了【商城基础道具】,系统已为您增加了", I2S(int), "资源!"));
can you let YDWEOperatorString3 to string + +?
can you let I2S(int) to int or int + ""?
function main takes nothing returns nothing
call InitTrig_gwjc() // INLINED!!
endfunction
is not ok
function main takes nothing returns nothing
call InitTrig_gwjc()
endfunction
is ok
how can use it in java?can you build an exe for cmd use?
YDLocal[x]Set or get have YDLocalSet YDLocalGet !
no [x]
str = str.replace("=-", "= -");// set a=-1
str = str.replace(">-", "> -");// if a>-1
str = str.replace("<-", "< -");
str = str.replace("endglobals", "endglobals\n\n");
maybe u can check this!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.